//侧边栏 前4项的页面跳转
var li_list = document.querySelectorAll(".select li")
li_list[0].addEventListener('click',function(){
    location.href = "/chapter12"
})
li_list[1].addEventListener('click',function(){
    location.href = "/chapter12/upload"
})
li_list[2].addEventListener('click',function(){
    location.href = "/chapter12/search"
})
li_list[3].addEventListener('click',function(){
    location.href = "/chapter12/mynode"
})

//BEGIN按钮跳转至上传笔记页面
var begin = document.querySelector(".toBegin")
begin.addEventListener('click',function (){
    location.href = "/chapter12/upload"
})

//获取用户名展示欢迎标语
userCookie = getCookie("username")
if(userCookie){
    document.querySelector(".l_img p").innerHTML= "欢迎!" + " " +userCookie
}